package com.tx.server.controller;

import javax.servlet.http.HttpServletRequest;

import com.tx.framework.entity.User;

import org.springframework.beans.factory.annotation.Autowired;


public class BaseController {

	@Autowired
	protected HttpServletRequest request;

	public User getUser() {
		/*Object obj = request.getSession().getAttribute("user");
		if (obj == null) {
			request.getSession().invalidate();
			throw new NoLoginException("用户未登录或登录失效");
		} else {
			String jsonStr = JsonUtility.toString(obj);
			SysUserInfo qhSysLoginInfo = JsonUtility.toObj(jsonStr,SysUserInfo.class);
			return qhSysLoginInfo;
		}*/
		User user=new User();
		user.setId(1);
		user.setCompanyId(2);
		return user;
	}


}
